﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MvcModel.Models
{
    public class MusicStoreBDInitializer:System.Data.Entity.DropCreateDatabaseAlways<MusicStoreDB>
    {
        protected override  void Seed(MusicStoreDB context)
        {
            context.Artists.Add(new Artist { Name = "邓紫棋" });
            context.Genres.Add(new Genre { Name = "轻音乐" });
            context.Albums.Add(new Album { Artist = new Artist { Name = "rush" }, Genre = new Genre { Name = "Rock" }, Price = 19.9m, Title = "Garavan" });
            base.Seed(context);
        }
    }
}